package cn.hxzy.kaoshi.mapper;

import cn.hxzy.kaoshi.entity.SysExam;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 考试管理 Mapper 接口
 * </p>
 *
 * @author tyqw
 * @since 2024-12-13
 */
@Service
public interface SysExamMapper extends BaseMapper<SysExam> {
    //查询班级相关的考试信息
    @MapKey("exam_id")
    List<Map> fselectAll(Map map);

    //学生根据id查询班级

    @Delete("DELETE FROM sys_exam WHERE exam_id =#{examId}")
    void deleteExam(@Param("examId") Long examId);

    Map<String,Object> xueshichaban(Long userid);
    //试卷查询
    List<Map> findExaminations(Map<String,Object> map);
    //班级查询
    List<Map> findClass();
}
